import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.Scanner;

public class Demo10 {
    public static void main(String[] args) throws FileNotFoundException {
        try (InputStream inputStream=new FileInputStream("d:/test/AAA/test.txt")){
            while (true){
                byte[] bytes=new byte[1024];
                int n=inputStream.read(bytes);
                for (int i=0;i<n;i++){
                    System.out.println(bytes[i]);
                }
                if(n==-1)break;
            }

//            Scanner scanner=new Scanner(inputStream);
//            String s=scanner.next();
//            System.out.println(s);
        } catch (IOException e) {
            e.printStackTrace();
        }


    }
    }

